package com.kevin.demo.entity.area;

import com.alibaba.fastjson.JSON;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.Min;
import java.util.Date;

@Table(name = "tb_area")
public class Area {

    @Id
    @ApiModelProperty("主键")
    protected Integer id;

    @ApiModelProperty(name = "区域名称")
    private String areaName;

    @Min(value=4, message = "此值不得小于4")
    @ApiModelProperty(name = "优先级")
    private Integer priority;

    @ApiModelProperty(name = "创建时间")
    private Date createTime;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getAreaName() {
        return areaName;
    }

    public void setAreaName(String areaName) {
        this.areaName = areaName;
    }

    public Integer getPriority() {
        return priority;
    }

    public void setPriority(Integer priority) {
        this.priority = priority;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }
}